package com.wan.data.mysql.orm.entity;

import com.wan.data.mysql.orm.annotion.Column;

import java.io.Serializable;
import java.util.Date;

public abstract class AbstractEntity<PK extends Serializable> implements Entity<PK>{
    @Column(comment = "修改时间")
    private Date modifyTime;
    @Column(comment = "创建时间")
    private Date createTime;

    public AbstractEntity() {
        this.createTime = new Date();
        this.modifyTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
